package com.cssw.fyzb.core.dao.msg;

import com.cssw.fyzb.core.model.dodb.SysMessage;
import com.ydn.dbframe.plugin.activerecord.Page;

import java.util.List;
import java.util.Map;

public interface MsgDao {

    /**
     * 前端用户
     *
     * @return com.ydn.dbframe.plugin.activerecord.Page<com.cssw.fyzb.core.model.dodb.SysMessage>
     * @Param [page, limit, status]
     **/
    Page<SysMessage> list(int page, int limit, String state);

    /**
     * 后台
     *
     * @return com.ydn.dbframe.plugin.activerecord.Page<com.cssw.fyzb.core.model.dodb.SysMessage>
     * @Param [page, limit, param]
     **/
    Page<SysMessage> listMsg(int page, int limit, Map param);

    void save(String title, String content, Long operId);

    void update(Long msgId, String title, String content, Long operId);

    /**
     * 假删除改状态
     *
     * @return void
     * @Param [msgId, status]
     **/
    void updateStatus(Long msgId, String status, Long operId);

    /**
     * 查重
     *
     * @return
     * @Param
     **/
    List<SysMessage> listTitle(String title);

    List<SysMessage>  getTitle(String title, Long msgId);

    SysMessage detail(Long msgId);
}
